/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */
//>>built
define("esri/dijit/editing/tools/ToolBase",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","dojo/i18n!esri/nls/jsapi"],function(b,c,d,e,f){b=b(null,{declaredClass:"esri.dijit.editing.tools.ToolBase",_enabled:!0,showLabel:!1,constructor:function(a,b){a=a||{};c.mixin(this,a);this.label=this._label?f.widgets.editor.tools[this._label]:"";this._settings=a.settings;this._toolbar=a.settings.drawToolbar;this._editToolbar=a.settings.editToolbar;this._initializeTool()},onFinished:function(){},
onDrawEnd:function(){},onApplyEdits:function(){},postCreate:function(){this.deactivate();this.inherited(arguments)},destroy:function(){},activate:function(a){this._toolbar&&this._toolbar.deactivate();this._editToolbar&&this._editToolbar.deactivate();this._enabled&&(this._checked=!0,this._layer=a,this._toolbar&&this._drawType&&this._toolbar.activate(this._drawType))},deactivate:function(){this._toolbar&&this._toolbar.deactivate();this._editToolbar&&this._editToolbar.deactivate();this.setChecked(!1);
this._updateUI()},setEnabled:function(a){this._enabled=a;this._updateUI()},setChecked:function(a){this._checked=a},enable:function(a){this._updateUI()},isEnabled:function(){return this._enabled},getToolName:function(){return this._toolName},_initializeTool:function(){},_updateUI:function(){this.disabled=!this._enabled;this.attr("iconClass",this._enabled?this._enabledIcon:this._disabledIcon)}});d("extend-esri")&&c.setObject("dijit.editing.tools.ToolBase",b,e);return b});